package com.kyrioscraft.cloud.thead.jdklab.tools.simple;

/**
 * @Author kyrioscraft
 * @Date 2019/2/14 10:40
 * @Description //TODO
 **/
public class JoinDemo {

    public volatile static int i=0;
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            for(i=0;i<10000000;i++);
        });
        t1.start();
        try{
            t1.join();
        }catch (InterruptedException e){

        }

        System.out.println(i);
    }
}
